Skip to content

new code#408

Open
Anshv9616 wants to merge 1 commit intoshikaruki:mainfrom
Anshv9616:main
Open

new code#408
Anshv9616 wants to merge 1 commit intoshikaruki:mainfrom
Anshv9616:main

Conversation

@Anshv9616
Copy link
Copy Markdown

key changes :

Node Constructor: Simplified node creation using a constructor.
Return Value on Empty Queue: Changed the return value of deQueue to -1 instead of Integer.MIN_VALUE to indicate an empty queue more clearly.
Display Function: Used a do-while loop to ensure the front node is included in the output even if the queue has only one element.
Clarity: Cleaned up comments and improved overall readability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant